package com.pandora.loan.home.web.advice.util;

import com.pandora.loan.home.enums.ExceptionEnum;

import java.util.HashMap;
import java.util.Map;

/**
 * @author developer
 */
public class ExceptionEnumConverter {
    public static Map<String, Object> convertToMap(ExceptionEnum exceptionEnum) {
        Map<String, Object> ret = new HashMap<>(2);
        ret.put("err_code", exceptionEnum.getCode());
        ret.put("err_msg", exceptionEnum.getMsg());
        return ret;
    }
}
